<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <title>smartmontools - S.M.A.R.T. testing (last updated $Date: 2009/03/13 13:27:45 $)</title>
 <link rev="made" href="mailto:smartmontools-support&#64;sourceforge.net" />
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1" />
 <meta name="description" content="smartmontools - S.M.A.R.T. testing" />
 <meta name="keywords" content="testing, online test, offline test, selftest, attributes, documentation, smartctl, smartd, S.M.A.R.T., SMART, disk, monitor, monitoring" />
 <meta name="DC.creator" content="Bruce Allen" />
 <meta name="DC.contributor" content="Gabriele Pohl" />
 <meta name="DC.rights" scheme="DCTERMS.URI" content="http://www.gnu.org/licenses/gpl-2.0.html" />
 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
 <meta http-equiv="content-style-type" content="text/css" />
 <link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>
<body>
<!-- $Id: smart-testing.html,v 1.2 2009/03/13 13:27:45 dipohl Exp $ -->
<div id="header">
    <h1><a id="logo" href="http://smartmontools.sourceforge.net/"><img src="../smart_logo.gif" width="105" height="59" border="0" hspace="20" align="middle" name="smartmontools_Logo" alt="S.M.A.R.T. Logo" /></a>
    smartmontools - S.M.A.R.T. testing</h1>
</div>

<div id="mainmenu" class="nav">
    <ul>
        <li class="first"><a accesskey="n" href="../index.html">Home</a></li>
        <li class="active"><a href="../doc.html">Documentation</a></li>
        <li><a accesskey="d" href="../download.html">Download</a></li>
        <li><a accesskey="f" href="../faq.html">FAQ</a></li>
        <li><a accesskey="h" href="../help.html">Help</a></li>
        <li><a accesskey="a" href="../about.html">About</a></li>
        <li><a accesskey="l" href="../links.html">Links</a></li>
        <li class="last"><a accesskey="s" href="../sphider/search.php">Search</a></li>
    </ul>
</div>

<div id="index">
<h2>S.M.A.R.T. testing</h2>
<p>In this section we introduce the different methods of <i>testing</i>,
S.M.A.R.T. can do.</p>

<ul class="High">
    <li><a href="#types-of-tests">Different types of <i>testing</i></a></li>
    <li><a href="#online-test">Online test</a> - Update S.M.A.R.T. attributes</li>
    <li><a href="#offline-test">Offline test</a> - Update some more S.M.A.R.T. attributes</li>
    <li><a href="#selftest">Selftest</a> - Check and stress your disk</li>
</ul>
</div>
<div>
<span class="marked">D R A F T &nbsp; and work in progress..</span>
<h3><a name="types-of-tests"></a>Different types of <i>testing</i></h3>

<p>The choice<sup><a href="#footnote1">1</a></sup> of the word <i>testing</i> for the
online and offline tests, is unfortunate, and often leads to confusion.
In fact these first two categories could have been more accurately described as
online and offline <i><strong>data collection</strong></i>.</p>

<p>The results of the collection are reflected in the values of the SMART Attributes.
Thus, if problems or errors are detected, the values of these attributes will go below
their failure thresholds; some types of errors may also appear in the
SMART error log. Call <tt>smartctl</tt> with option <tt>'-l error'</tt> to check the log entries.</p>

<p>Some SMART attribute values are updated only during off-line data collection activities;
the rest are updated during normal operation of the device or during both normal
operation and off-line testing.</p>

<p>To see, by which actions the attributes are updated,
call <tt>smartctl</tt> with option <tt>'-A'</tt>.</p>

<pre>
# smartctl -A /dev/sda
smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   057   048   006    Pre-fail  Always       -       123453991
  3 Spin_Up_Time            0x0003   097   097   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       20
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   090   060   030    Pre-fail  Always       -       940448850
  9 Power_On_Hours          0x0032   082   082   000    Old_age   Always       -       16352
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1913
194 Temperature_Celsius     0x0022   050   056   000    Old_age   Always       -       50
195 Hardware_ECC_Recovered  0x001a   057   048   000    Old_age   Always       -       123453991
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
<span class="light">198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0</span>
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
<span class="light">200 Multi_Zone_Error_Rate   0x0000   100   253   000    Old_age   Offline      -       0</span>
202 TA_Increase_Count       0x0032   100   253   000    Old_age   Always       -       0
</pre>

<p>Look at the values in column <tt>UPDATED</tt>. Attributes labeled with value
<tt>'Offline'</tt> are only updated by offline tests. Attributes labeled <tt>'Always'</tt>
are updated by both methods <tt>'Online'</tt> and <tt>'Offline'</tt> tests.</p>

<p>So in the example above, the values of the two attributes <tt>Offline_Uncorrectable</tt>
and <tt>Multi_Zone_Error_Rate</tt> will only reflect the actual state, if you enable the 
automatic offline test or just called it manually.</p>

<p><span class="copyright"><a name="footnote1">[1]</a> The authors of the SFF-8035i and ATA
specification named it so.</span></p>

<h3><a name="online-test"></a>Online Test - Update S.M.A.R.T. attributes</h3>

<p>The so called <i>online</i> test,
<span class="marked">has no effect on the performance of the device</span>.</p>

<p>It is turned on by option <tt>'-s on'</tt>.</p>

<h3><a name="offline-test"></a>Offline Test - Update some more S.M.A.R.T. attributes</h3>

<p>The offline test can, in principle, <span class="marked">degrade the device performance.</span></p>

<p>The <tt>'-o on'</tt> option causes this offline testing to be carried out,
automatically, on a regular scheduled basis. Normally, the disk will suspend
offline testing while disk accesses are taking place, and then automatically
resume it when the disk would otherwise be idle, so in practice it has little effect.</p>

<p>Note that with <tt>'-t offline'</tt> option, a one-time offline test can also be carried
out immediately upon receipt of a user command.</p>

<p class="light">Note that the SMART automatic offline test command
is listed as "Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
It was originally part of the SFF-8035i Revision 2.0 specification,
but was never part of any ATA specification. However it is implemented
and used by many vendors. [Good documentation can be found in IBM's
Official Published Disk Specifications. For example the
IBM Travelstar 40GNX Hard Disk Drive Specifications
(Revision 1.1, 22 April 2002, Publication # 1541, Document S07N-7715-02) page 164.
You can also read the SFF-8035i Specification -- see REFERENCES below.]
You can tell if automatic offline testing is supported by
seeing if this command enables and disables it, as indicated by
the 'Auto Offline Data Collection' part of the SMART capabilities
report (displayed with '-c').</p>

<h3><a name="selftest"></a>Selftest - Check and stress your disk</h3>

<p>The third category of testing (and the only category for which
the word 'testing' is really an appropriate choice) is <i>self</i> testing.
It is only performed (immediately) when a command to run it is issued.
The <tt>'-t'</tt> and <tt>'-X'</tt> options can be used to carry out and
abort such self-tests.</p>

<p>The tests check the electrical and mechanical performance as well
as the read performance of the disk. Their results and any errors detected
during the tests are reported in the Self Test Error Log, which can be examined
using the '-l selftest' option.</p>

<p>Note that on some disks the progress of the self-test can be monitored
by watching this log during the self-test; with other disks use the
<tt>'-c'</tt> option to monitor progress.</p>

<p>If the <tt>'-c'</tt> option to smartctl shows that the device has the
<tt>"Suspend Offline collection upon new command"</tt> capability
then you can track the progress of the Immediate Offline test
using the <tt>'-c'</tt> option to smartctl.</p>

<p>If the '-c' option show that the device has the
<tt>"Abort Offline collection upon new command"</tt> capability
then most commands will abort the Immediate Offline Test,
so you should not try to track the progress of the test with <tt>'-c'</tt>,
as it will abort the test.</p>

</div>
<hr style="clear:left" />
 <div align="center"><font size="-1">Hosted by<br /><a href="http://sourceforge.net/projects/smartmontools"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=64297&amp;type=13" width="120" height="30" border="0" alt="Get S.M.A.R.T. Monitoring Tools at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a><br />
 Maintained by: <a href="http://www.dipohl.de/">Gabriele Pohl</a><br />
 Copyright (C) 2008-9 Bruce Allen, Gabriele Pohl published under <a href="http://www.gnu.org/licenses/gpl-2.0.html#SEC1">GNU GPL</a><br />
Last update: $Date: 2009/03/13 13:27:45 $</font><br />
<a href="http://validator.w3.org/checklink?uri=http%3A%2F%2Fsmartmontools.sourceforge.net%2Fdocs%2Fsmart-testing.html">W3C Link-Checker</a><br />
<a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10-blue"
        alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
    <img style="border:0;width:88px;height:31px"
        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
        alt="CSS ist valide!" /></a>
</div>
</body>
</html>
